import { storage } from './../../../../../utils/storage'
/*
 * @Author: CQJ
 * @Date: 2022-08-25 20:00:27
 * @LastEditors: CQJ
 * @LastEditTime: 2022-09-08 17:15:43
 * @Description:
 */
import { reactive } from 'vue'

type Key = string
interface AreaState {
  area_id: string | undefined
  keyword: string | undefined
  site_id: string | undefined
}

// 状态管理
export const areaState = reactive<AreaState>({
  area_id: undefined,
  keyword: undefined,
  site_id: undefined
})
interface StatusState {
  formVisible: boolean
  batchVisible: boolean
  selectedRowKeys: Key[]
  isAdd: boolean
}
// 状态管理
export const statusState = reactive<StatusState>({
  formVisible: false,
  batchVisible: false,
  selectedRowKeys: [],
  isAdd: false
})
export const resetState = () => {
  areaState.keyword = undefined
  areaState.area_id = undefined
}
